package OI_test;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class copy_jpg {
    public static void main(String[] args) throws IOException {
        //将user1用FileInputSteam来读取
        //再用FileOutSteam来写入user2文件，实现负责的功能
        FileInputStream input = new FileInputStream("study/src/user1.txt");
        FileOutputStream out = new FileOutputStream("study/src/user2.txt");
        byte[] b = new byte[1024];
        int len;
        while ((len = input.read()) != -1) {
            out.write(b, 0 , len);
        }
        out.close();
        input.close();
    }
}
